
import Request from '../util/request'

export default class User extends Request {

  // pay password
  checkPayPassword(data) {
    return this.request({
      url: '/h5/execute/user/check-pay-password',
      data
    })
  }

  editPayPassword(data) {
    return this.request({
      url: '/h5/execute/user/edit-pay-password',
      data
    })
  }

  payForget(data) {
    return this.request({
      url: '/h5/execute/user/reset-pay-password',
      data
    })
  }

  verifyPayPassword(data) {
    return this.request({
      url: '/h5/execute/user/verify-pay-password',
      data
    })
  }

  register(data) {
    return this.request({
      url: '/h5/user/register',
      data
    })
  }

  login(data) {
    return this.request({
      url: '/h5/user/login',
      data
    })
  }

  getVerify(data) {
    return this.request({
      url: '/h5/user/verify-code',
      data
    })
  }

  checkVerify(data) {
    return this.request({
      url: '/h5/user/check-verify',
      data
    })
  }

  getInfo(data) {
    return this.request({
      url: '/h5/user/get-info',
      data
    })
  }

  getAvatar(data) {
    return this.request({
      url: '/h5/uni/center/get-avatar',
      data
    })
  }

  setAvatar(data) {
    return this.request({
      url: '/h5/uni/center/set-avatar',
      data
    })
  }

  // 推广码, 这个和之前版本有些区别
  qrcodeListH5(data) {
    return this.request({
      url: '/h5/execute/user/qrcode',
      data
    })
  }

  qrcodeListApp(data) {
    return this.request({
      url: '/h5/execute/user/qrcode-app',
      data
    })
  }

  // 小程序设置---------------------------------------
  getSet(data) {
    return this.request({
      url: '/h5/mini/user/get-set',
      data
    })
  }

  getAgreement(data) {
    return this.request({
      url: '/h5/mini/user/agreement',
      data
    })
  }

  // APP 上架需要各种协议
  getAgreementAll(data) {
    return this.request({
      url: '/h5/mini/user/agreement-all',
      data
    })
  }

  // 小程序登录
  loginMini(data) {
    return this.request({
      url: '/h5/mini/user/login',
      data
    })
  }

  saveMobile(data) {
    return this.request({
      url: '/h5/mini/user/save-mobile',
      data
    })
  }

  changeAvatar(data) {
    return this.request({
      url: '/h5/mini/user/change-avatar',
      data
    })
  }

  // 推荐码
  qrcodeList(data) {
    return this.request({
      url: '/h5/mini/mini-qrcode/get-qrcode',
      data
    })
  }

}
